package Demo1299.Demo3;

import java.lang.reflect.Method;

/**
 * @Author:LiRegin
 * @Date: 2019/12/8 16:27:59
 */
public class Test {
    public static void main(String[] args) throws Exception {
        Class<?> aClass = Class.forName("Demo1299.Demo3.Dog");
        Object o = aClass.getConstructor().newInstance();
        Method cell = aClass.getMethod("cell");
        cell.invoke(o);
        Method sleep = aClass.getMethod("sleep");
        sleep.invoke(o);
    }
}
